package com.yhd.cloudmanage.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * 用户表Entity类
 *
 * @author liyan
 * @since 2020-06-11 15:54:29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("main_user")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="MainUser对象", description="用户表")
public class MainUser implements Serializable {

    private static final long serialVersionUID=1L;


    @ApiModelProperty(value = "用户ID，自增")
        @TableId(value = "user_id", type = IdType.AUTO)
                    private Integer userId;

    @ApiModelProperty(value = "用户唯一ID")
    @TableField("open_id")
            private String openId;

    @ApiModelProperty(value = "用户token，唯一")
    @TableField("token")
            private String token;

    @ApiModelProperty(value = "国家")
    @TableField("country")
            private String country;

    @ApiModelProperty(value = "省份")
    @TableField("province")
            private String province;

    @ApiModelProperty(value = "城市")
    @TableField("city")
            private String city;

    @ApiModelProperty(value = "性别。1：男 2：女")
    @TableField("gender")
            private Boolean gender;

    @ApiModelProperty(value = "头像URL")
    @TableField("avatar_url")
            private String avatarUrl;

    @ApiModelProperty(value = "微信昵称")
    @TableField("nick_name")
            private String nickName;

    @ApiModelProperty(value = "电话号码")
    @TableField("phone_num")
            private String phoneNum;

    @ApiModelProperty(value = "生日")
    @TableField("birth_date")
            private LocalDateTime birthDate;

    @ApiModelProperty(value = "系统用户身份，默认就是普通用户 1：普通用户，2：管理员")
    @TableField("user_type")
            private Boolean userType;

    @TableField("create_time")
            private LocalDateTime createTime;

    @TableField("update_time")
            private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除。0：删除。1：未删除")
    @TableField("delete_flag")
            private Boolean deleteFlag;

    @ApiModelProperty(value = "是否有效。1：有效，2：失效")
    @TableField("is_valid")
            private Integer isValid;
}
